package o;

import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.huawei.appmarket.R;
import huawei.widget.HwButton;

public class dlf {
    private ImageView ʻ;
    private HwButton ʼ;
    private OnClickListener ʽ;
    private TextView ˊ;
    private View ˋ;
    private ProgressBar ˎ;
    private View ˏ;
    private OnClickListener ˏॱ;
    private View ॱ;
    private View ॱॱ;
    private HwButton ᐝ;

    public void ˏ(View view) {
        this.ˋ = view;
        this.ˎ = (ProgressBar) view.findViewById(R.id.loadingBar);
        this.ˊ = (TextView) view.findViewById(R.id.title);
        this.ˏ = view.findViewById(R.id.network_disconnect_layout);
        this.ʻ = (ImageView) view.findViewById(R.id.no_wifi);
        this.ॱॱ = view.findViewById(R.id.retry_btn_layout);
        this.ʼ = (HwButton) view.findViewById(R.id.reconnect);
        this.ᐝ = (HwButton) view.findViewById(R.id.cancel);
        this.ॱ = view.findViewById(R.id.loadingBar_layout);
        this.ॱ.setBackgroundColor(view.getContext().getResources().getColor(R.color.emui_white));
        this.ʼ.setOnClickListener(new OnClickListener(this) {
            final /* synthetic */ dlf ˊ;

            {
                this.ˊ = r1;
            }

            public void onClick(View view) {
                if (this.ˊ.ʽ != null) {
                    this.ˊ.ˎ();
                    this.ˊ.ʽ.onClick(this.ˊ.ʼ);
                }
            }
        });
        this.ᐝ.setOnClickListener(new OnClickListener(this) {
            final /* synthetic */ dlf ˎ;

            {
                this.ˎ = r1;
            }

            public void onClick(View view) {
                if (this.ˎ.ˏॱ != null) {
                    this.ˎ.ˏॱ.onClick(this.ˎ.ᐝ);
                }
            }
        });
    }

    protected void ˎ() {
        this.ˎ.setVisibility(0);
        this.ˏ.setVisibility(8);
        if (this.ॱ != null) {
            this.ॱ.setVisibility(0);
        }
    }

    public void ˋ() {
        CharSequence string = this.ˋ.getResources().getString(R.string.oobe_cannot_connect_server);
        this.ʻ.setImageResource(R.drawable.ic_no_wifi_disable);
        this.ॱॱ.setVisibility(0);
        this.ˎ.setVisibility(8);
        if (this.ॱ != null) {
            this.ॱ.setVisibility(8);
        }
        this.ˏ.setVisibility(0);
        this.ˊ.setText(string);
    }

    public void ॱ(int i) {
        this.ˋ.setVisibility(i);
    }

    public void ˏ(OnClickListener onClickListener) {
        this.ʽ = onClickListener;
    }

    public void ˋ(OnClickListener onClickListener) {
        this.ˏॱ = onClickListener;
    }

    public void ˊ() {
        this.ʼ.setVisibility(4);
        this.ᐝ.setVisibility(4);
    }
}
